package cn.baage.campus.service.impl;

import cn.baage.campus.mapper.CommentImgMapper;
import cn.baage.campus.model.po.CommentImg;
import cn.baage.campus.service.CommentImgService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 评论图片Service实现
 * @Author: 八阿哥
 * @url: baage.cn
 * @Version: 1.0
 **/
@Service
public class CommentImgServiceImpl extends ServiceImpl<CommentImgMapper, CommentImg> implements CommentImgService {


    /**
     * 获取评论
     *
     * @param commentId 帖子ID
     * @return 评论
     */
    @Override
    public List<CommentImg> listByCommentId(String commentId) {
        LambdaQueryWrapper<CommentImg> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(CommentImg::getCommentId, commentId);
        return baseMapper.selectList(queryWrapper);
    }



}
